<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'update.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<form action="planupdate" method="post">
		计划id:<input type="text" name="pid" value="${plan.pid }" readonly="readonly"><br>	
		计划名称:<input type="text" name="pname" value="${plan.pname }"><br>
		开始时间：<input type="text" name="pstar" value="<fmt:formatDate pattern="yyyy-MM-dd" value="${plan.pstar }" />"><br>
   		结束时间：<input type="text" name="pend"  value="<fmt:formatDate pattern="yyyy-MM-dd" value="${plan.pend }" />"><br>
		计划内容:<input type="text" name="pcontent" value="${plan.pcontent }"><br>
		计划人:<input type="text" name="pmakeren" value="${plan.pmakeren }"><br>
		计划状态:<input type="text" name="pstate" value="${plan.pstate }"><br>
		计划费用:<input type="text" name="pcoutmoney" value="${plan.pcoutmoney }" readonly="readonly"><br>
		<input type="submit" value="修改">
	</form>
	<span>==================分割线============================</span>
	
	<table border="1">
   	<tr>
   		<td>明细id</td>
   		<td>计划id</td>
   		<td>明细标题</td>
   		<td>明细内容</td>
   		<td>明细金额</td>
   		<td>操作</td>
   	</tr>
   <c:forEach items="${dlist }" var="detail">
   <tr>
   
   		<td>${detail.did }</td>
   		<td>${detail.pid }</td>
   		<td><a href="detailgetBydid?did=${detail.did }" >${detail.dtitle }</a></td>
   		<td>${detail.dcontent }</td>
   		<td>${detail.dmoney }</td>
   		<td><a href="detaildelete?did=${detail.did }&pid=${detail.pid }">删除</a></td>
   	</tr>
   
   </c:forEach>
   
   </table>
   <a href="detailadd.jsp?pid=${plan.pid }">添加</a>
	
</body>
</html>
